<link href="<?= $this->webroot ?>assets/css/colorBox/colorbox.css" rel="stylesheet" type="text/css"/>
<script src="<?= $this->webroot ?>assets/plugins/colorBox/jquery.colorbox.js" type="text/javascript"></script>
<div class="col-md-12">

<!-- BEGIN BORDERED TABLE PORTLET-->
<div class="portlet">
	<div class="portlet-title">
		<div class="caption"> <i class="fa fa-eye"></i><?= __('Thông tin Sản phẩm'); ?> </div>
		<div class="tools"> </div>
	</div>
	<div class="portlet-body form">
		<form class="form-horizontal" role="form">
		<div class="form-body">
			<h2 class="margin-bottom-20"> <?= $info[$als]['name'] ?> </h2>

			<h3 class="form-section"><?= __('Chi Tiết');?></h3>
			<div class="row">
				<div class="col-md-6">
					<div class="form-group">
						<label class="control-label col-md-3"><?= __('Danh mục'); ?>:</label>
						<div class="col-md-9">
							<p class="form-control-static">
								<a href="<?= $this->webroot . 'admin/categories/info/' .$category['Category']['id'] ?>"><b><?= $category['Category']['name'] ?></b></a>
							</p>
						</div>
					</div>
				</div>

				<div class="col-md-6">
					<div class="form-group">
						<label class="control-label col-md-3"><?= __('Tên gọi khác'); ?>:</label>
						<div class="col-md-9">
							<p class="form-control-static"> <b><?= $info[$als]['als'] ?> </b></p>
						</div>
					</div>
				</div>

				<div class="col-md-6">
					<div class="form-group">
						<label class="control-label col-md-3"><?= __('Mới'); ?>:</label>
						<div class="col-md-9">
							<p class="form-control-static"> <b><?= $info[$als]['new'] == 1 ? 'Có' : 'Không' ?> </b></p>
						</div>
					</div>
				</div>

				<div class="col-md-6">
					<div class="form-group">
						<label class="control-label col-md-3"><?= __('Nổi bậc'); ?>:</label>
						<div class="col-md-9">
							<p class="form-control-static"> <b><?= $info[$als]['prominent'] == 1 ? 'Có' : 'Không' ?> </b></p>
						</div>
					</div>
				</div>

				<div class="col-md-6">
					<div class="form-group">
						<label class="control-label col-md-3"><?= __('Bán chạy'); ?>:</label>
						<div class="col-md-9">
							<p class="form-control-static"> <b><?= $info[$als]['run'] == 1 ? 'Có' : 'Không' ?> </b></p>
						</div>
					</div>
				</div>

				<div class="col-md-6">
					<div class="form-group">
						<label class="control-label col-md-3"><?= __('Trạng thái'); ?>:</label>
						<div class="col-md-9">
							<p class="form-control-static"> <b><?= @$status[$info[$als]['status']] ;?> </b> </p>
						</div>
					</div>
				</div>
			</div>

			<h3 class="form-section"><?= __('Miêu tả');?></h3>
			<div class="row">
				<div class="col-md-12">
					<?= $info[$als]['desc'] ?>
				</div>
			</div>

			<?php if(isset($images) && count( $images ) > 0):?>
			<h3 class="form-section">
				<?= __('Hình ảnh');?>
				<small> <i class="fa  fa-angle-double-right"></i> <a href="<?= $this->webroot.'admin/products/addImage/' . $info[$als]['id'] ?>" class="">Thêm ảnh mới</a></small>
			</h3>
			<div class="row tc-gallery">
				<?php $i = 0; foreach($images as $img): $i++?>
				<div class="col-sm-7 col-md-3 item" id="<?php echo $img['Image']['id']; ?>" data-als="<?= $als ?>">
					<div class="thumbnail">
						<a href="<?php echo PUBLIC_DETAIL_SHOW. $img['Image']['image'] ?>" data-rel="colorbox">
						<img src="<?php echo PUBLIC_THUMB_SHOW. $img['Image']['image'] ?>" alt="...">
						</a>

						<div class="tools tools-bottom">
							<a href="#">
								<i class="fa fa-times text-white"></i>
							</a>
						</div>
					</div>
				</div>

				<?php if($i == 4) : $i = 0;?>
				<div class="clearfix"></div>
				<?php endif; ?>
				<?php endforeach;?>
			</div>
			<?php endif; ?>

		</div>

		<div class="form-actions fluid">
			<div class="row">
				<div class="col-md-6">
					<div class="col-md-offset-3 col-md-9">
						<a href="<?= $this->webroot . 'admin/products/add/' . $category['Category']['id'] . '/'. $info[$als]['id'] ?>" type="submit" class="btn btn-success"><i class="fa fa-pencil"></i> <?= __('Chỉnh sửa')?></a>
					</div>
				</div>
				<div class="col-md-6">
				</div>
			</div>
		</div>
		</form>
	</div>

	</div>
</div>

<!-- END BORDERED TABLE PORTLET-->
</div>
